package org.gap.dao;

import java.util.Arrays;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Set;

import javax.persistence.EntityManager;
import javax.persistence.NoResultException;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;

import org.gap.domain.TiersRib;

import org.skyway.spring.util.dao.AbstractJpaDao;

import org.springframework.dao.DataAccessException;

import org.springframework.stereotype.Repository;

import org.springframework.transaction.annotation.Transactional;

/**
 * DAO to manage TiersRib entities.
 * 
 */
@Repository("TiersRibDAO")
@Transactional
public class TiersRibDAOImpl extends AbstractJpaDao<TiersRib> implements
		TiersRibDAO {

	/**
	 * Set of entity classes managed by this DAO.  Typically a DAO manages a single entity.
	 *
	 */
	private final static Set<Class<?>> dataTypes = new HashSet<Class<?>>(Arrays.asList(new Class<?>[] { TiersRib.class }));

	/**
	 * EntityManager injected by Spring for persistence unit 
	 *
	 */
	@PersistenceContext(unitName = "")
	private EntityManager entityManager;

	/**
	 * Instantiates a new TiersRibDAOImpl
	 *
	 */
	public TiersRibDAOImpl() {
		super();
	}

	/**
	 * Get the entity manager that manages persistence unit 
	 *
	 */
	public EntityManager getEntityManager() {
		return entityManager;
	}

	/**
	 * Returns the set of entity classes managed by this DAO.
	 *
	 */
	public Set<Class<?>> getTypes() {
		return dataTypes;
	}

	/**
	 * JPQL Query - findTiersRibByTrbRib
	 *
	 */
	@Transactional
	public Set<TiersRib> findTiersRibByTrbRib(Integer trbRib) throws DataAccessException {

		return findTiersRibByTrbRib(trbRib, -1, -1);
	}

	/**
	 * JPQL Query - findTiersRibByTrbRib
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<TiersRib> findTiersRibByTrbRib(Integer trbRib, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findTiersRibByTrbRib", startResult, maxRows, trbRib);
		return new LinkedHashSet<TiersRib>(query.getResultList());
	}

	/**
	 * JPQL Query - findTiersRibByTrbCompte
	 *
	 */
	@Transactional
	public Set<TiersRib> findTiersRibByTrbCompte(String trbCompte) throws DataAccessException {

		return findTiersRibByTrbCompte(trbCompte, -1, -1);
	}

	/**
	 * JPQL Query - findTiersRibByTrbCompte
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<TiersRib> findTiersRibByTrbCompte(String trbCompte, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findTiersRibByTrbCompte", startResult, maxRows, trbCompte);
		return new LinkedHashSet<TiersRib>(query.getResultList());
	}

	/**
	 * JPQL Query - findTiersRibByTrbDateCreation
	 *
	 */
	@Transactional
	public Set<TiersRib> findTiersRibByTrbDateCreation(java.util.Calendar trbDateCreation) throws DataAccessException {

		return findTiersRibByTrbDateCreation(trbDateCreation, -1, -1);
	}

	/**
	 * JPQL Query - findTiersRibByTrbDateCreation
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<TiersRib> findTiersRibByTrbDateCreation(java.util.Calendar trbDateCreation, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findTiersRibByTrbDateCreation", startResult, maxRows, trbDateCreation);
		return new LinkedHashSet<TiersRib>(query.getResultList());
	}

	/**
	 * JPQL Query - findTiersRibByTrbIban
	 *
	 */
	@Transactional
	public Set<TiersRib> findTiersRibByTrbIban(String trbIban) throws DataAccessException {

		return findTiersRibByTrbIban(trbIban, -1, -1);
	}

	/**
	 * JPQL Query - findTiersRibByTrbIban
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<TiersRib> findTiersRibByTrbIban(String trbIban, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findTiersRibByTrbIban", startResult, maxRows, trbIban);
		return new LinkedHashSet<TiersRib>(query.getResultList());
	}

	/**
	 * JPQL Query - findTiersRibByTrbTitulaire
	 *
	 */
	@Transactional
	public Set<TiersRib> findTiersRibByTrbTitulaire(String trbTitulaire) throws DataAccessException {

		return findTiersRibByTrbTitulaire(trbTitulaire, -1, -1);
	}

	/**
	 * JPQL Query - findTiersRibByTrbTitulaire
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<TiersRib> findTiersRibByTrbTitulaire(String trbTitulaire, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findTiersRibByTrbTitulaire", startResult, maxRows, trbTitulaire);
		return new LinkedHashSet<TiersRib>(query.getResultList());
	}

	/**
	 * JPQL Query - findTiersRibByTrbDateCreationAfter
	 *
	 */
	@Transactional
	public Set<TiersRib> findTiersRibByTrbDateCreationAfter(java.util.Calendar trbDateCreation) throws DataAccessException {

		return findTiersRibByTrbDateCreationAfter(trbDateCreation, -1, -1);
	}

	/**
	 * JPQL Query - findTiersRibByTrbDateCreationAfter
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<TiersRib> findTiersRibByTrbDateCreationAfter(java.util.Calendar trbDateCreation, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findTiersRibByTrbDateCreationAfter", startResult, maxRows, trbDateCreation);
		return new LinkedHashSet<TiersRib>(query.getResultList());
	}

	/**
	 * JPQL Query - findTiersRibByTrbCompteContaining
	 *
	 */
	@Transactional
	public Set<TiersRib> findTiersRibByTrbCompteContaining(String trbCompte) throws DataAccessException {

		return findTiersRibByTrbCompteContaining(trbCompte, -1, -1);
	}

	/**
	 * JPQL Query - findTiersRibByTrbCompteContaining
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<TiersRib> findTiersRibByTrbCompteContaining(String trbCompte, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findTiersRibByTrbCompteContaining", startResult, maxRows, trbCompte);
		return new LinkedHashSet<TiersRib>(query.getResultList());
	}

	/**
	 * JPQL Query - findTiersRibByTrbDateModification
	 *
	 */
	@Transactional
	public Set<TiersRib> findTiersRibByTrbDateModification(java.util.Calendar trbDateModification) throws DataAccessException {

		return findTiersRibByTrbDateModification(trbDateModification, -1, -1);
	}

	/**
	 * JPQL Query - findTiersRibByTrbDateModification
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<TiersRib> findTiersRibByTrbDateModification(java.util.Calendar trbDateModification, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findTiersRibByTrbDateModification", startResult, maxRows, trbDateModification);
		return new LinkedHashSet<TiersRib>(query.getResultList());
	}

	/**
	 * JPQL Query - findTiersRibByTrbDenomGuichet
	 *
	 */
	@Transactional
	public Set<TiersRib> findTiersRibByTrbDenomGuichet(String trbDenomGuichet) throws DataAccessException {

		return findTiersRibByTrbDenomGuichet(trbDenomGuichet, -1, -1);
	}

	/**
	 * JPQL Query - findTiersRibByTrbDenomGuichet
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<TiersRib> findTiersRibByTrbDenomGuichet(String trbDenomGuichet, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findTiersRibByTrbDenomGuichet", startResult, maxRows, trbDenomGuichet);
		return new LinkedHashSet<TiersRib>(query.getResultList());
	}

	/**
	 * JPQL Query - findTiersRibByTrbIbanContaining
	 *
	 */
	@Transactional
	public Set<TiersRib> findTiersRibByTrbIbanContaining(String trbIban) throws DataAccessException {

		return findTiersRibByTrbIbanContaining(trbIban, -1, -1);
	}

	/**
	 * JPQL Query - findTiersRibByTrbIbanContaining
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<TiersRib> findTiersRibByTrbIbanContaining(String trbIban, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findTiersRibByTrbIbanContaining", startResult, maxRows, trbIban);
		return new LinkedHashSet<TiersRib>(query.getResultList());
	}

	/**
	 * JPQL Query - findTiersRibByTrbEtablissement
	 *
	 */
	@Transactional
	public Set<TiersRib> findTiersRibByTrbEtablissement(Integer trbEtablissement) throws DataAccessException {

		return findTiersRibByTrbEtablissement(trbEtablissement, -1, -1);
	}

	/**
	 * JPQL Query - findTiersRibByTrbEtablissement
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<TiersRib> findTiersRibByTrbEtablissement(Integer trbEtablissement, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findTiersRibByTrbEtablissement", startResult, maxRows, trbEtablissement);
		return new LinkedHashSet<TiersRib>(query.getResultList());
	}

	/**
	 * JPQL Query - findTiersRibByTrbBic
	 *
	 */
	@Transactional
	public Set<TiersRib> findTiersRibByTrbBic(String trbBic) throws DataAccessException {

		return findTiersRibByTrbBic(trbBic, -1, -1);
	}

	/**
	 * JPQL Query - findTiersRibByTrbBic
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<TiersRib> findTiersRibByTrbBic(String trbBic, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findTiersRibByTrbBic", startResult, maxRows, trbBic);
		return new LinkedHashSet<TiersRib>(query.getResultList());
	}

	/**
	 * JPQL Query - findTiersRibByTrbDenomGuichetContaining
	 *
	 */
	@Transactional
	public Set<TiersRib> findTiersRibByTrbDenomGuichetContaining(String trbDenomGuichet) throws DataAccessException {

		return findTiersRibByTrbDenomGuichetContaining(trbDenomGuichet, -1, -1);
	}

	/**
	 * JPQL Query - findTiersRibByTrbDenomGuichetContaining
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<TiersRib> findTiersRibByTrbDenomGuichetContaining(String trbDenomGuichet, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findTiersRibByTrbDenomGuichetContaining", startResult, maxRows, trbDenomGuichet);
		return new LinkedHashSet<TiersRib>(query.getResultList());
	}

	/**
	 * JPQL Query - findTiersRibByTrbCleRib
	 *
	 */
	@Transactional
	public Set<TiersRib> findTiersRibByTrbCleRib(Integer trbCleRib) throws DataAccessException {

		return findTiersRibByTrbCleRib(trbCleRib, -1, -1);
	}

	/**
	 * JPQL Query - findTiersRibByTrbCleRib
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<TiersRib> findTiersRibByTrbCleRib(Integer trbCleRib, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findTiersRibByTrbCleRib", startResult, maxRows, trbCleRib);
		return new LinkedHashSet<TiersRib>(query.getResultList());
	}

	/**
	 * JPQL Query - findTiersRibByTrbDateCreationBefore
	 *
	 */
	@Transactional
	public Set<TiersRib> findTiersRibByTrbDateCreationBefore(java.util.Calendar trbDateCreation) throws DataAccessException {

		return findTiersRibByTrbDateCreationBefore(trbDateCreation, -1, -1);
	}

	/**
	 * JPQL Query - findTiersRibByTrbDateCreationBefore
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<TiersRib> findTiersRibByTrbDateCreationBefore(java.util.Calendar trbDateCreation, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findTiersRibByTrbDateCreationBefore", startResult, maxRows, trbDateCreation);
		return new LinkedHashSet<TiersRib>(query.getResultList());
	}

	/**
	 * JPQL Query - findTiersRibByTrbGuichetDomContaining
	 *
	 */
	@Transactional
	public Set<TiersRib> findTiersRibByTrbGuichetDomContaining(String trbGuichetDom) throws DataAccessException {

		return findTiersRibByTrbGuichetDomContaining(trbGuichetDom, -1, -1);
	}

	/**
	 * JPQL Query - findTiersRibByTrbGuichetDomContaining
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<TiersRib> findTiersRibByTrbGuichetDomContaining(String trbGuichetDom, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findTiersRibByTrbGuichetDomContaining", startResult, maxRows, trbGuichetDom);
		return new LinkedHashSet<TiersRib>(query.getResultList());
	}

	/**
	 * JPQL Query - findTiersRibByTrbTitulaireContaining
	 *
	 */
	@Transactional
	public Set<TiersRib> findTiersRibByTrbTitulaireContaining(String trbTitulaire) throws DataAccessException {

		return findTiersRibByTrbTitulaireContaining(trbTitulaire, -1, -1);
	}

	/**
	 * JPQL Query - findTiersRibByTrbTitulaireContaining
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<TiersRib> findTiersRibByTrbTitulaireContaining(String trbTitulaire, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findTiersRibByTrbTitulaireContaining", startResult, maxRows, trbTitulaire);
		return new LinkedHashSet<TiersRib>(query.getResultList());
	}

	/**
	 * JPQL Query - findTiersRibByTrbGuichetDom
	 *
	 */
	@Transactional
	public Set<TiersRib> findTiersRibByTrbGuichetDom(String trbGuichetDom) throws DataAccessException {

		return findTiersRibByTrbGuichetDom(trbGuichetDom, -1, -1);
	}

	/**
	 * JPQL Query - findTiersRibByTrbGuichetDom
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<TiersRib> findTiersRibByTrbGuichetDom(String trbGuichetDom, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findTiersRibByTrbGuichetDom", startResult, maxRows, trbGuichetDom);
		return new LinkedHashSet<TiersRib>(query.getResultList());
	}

	/**
	 * JPQL Query - findTiersRibByTrbDateModificationAfter
	 *
	 */
	@Transactional
	public Set<TiersRib> findTiersRibByTrbDateModificationAfter(java.util.Calendar trbDateModification) throws DataAccessException {

		return findTiersRibByTrbDateModificationAfter(trbDateModification, -1, -1);
	}

	/**
	 * JPQL Query - findTiersRibByTrbDateModificationAfter
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<TiersRib> findTiersRibByTrbDateModificationAfter(java.util.Calendar trbDateModification, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findTiersRibByTrbDateModificationAfter", startResult, maxRows, trbDateModification);
		return new LinkedHashSet<TiersRib>(query.getResultList());
	}

	/**
	 * JPQL Query - findTiersRibByTrbRibValide
	 *
	 */
	@Transactional
	public Set<TiersRib> findTiersRibByTrbRibValide(Boolean trbRibValide) throws DataAccessException {

		return findTiersRibByTrbRibValide(trbRibValide, -1, -1);
	}

	/**
	 * JPQL Query - findTiersRibByTrbRibValide
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<TiersRib> findTiersRibByTrbRibValide(Boolean trbRibValide, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findTiersRibByTrbRibValide", startResult, maxRows, trbRibValide);
		return new LinkedHashSet<TiersRib>(query.getResultList());
	}

	/**
	 * JPQL Query - findTiersRibByTrbTiers
	 *
	 */
	@Transactional
	public Set<TiersRib> findTiersRibByTrbTiers(Integer trbTiers) throws DataAccessException {

		return findTiersRibByTrbTiers(trbTiers, -1, -1);
	}

	/**
	 * JPQL Query - findTiersRibByTrbTiers
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<TiersRib> findTiersRibByTrbTiers(Integer trbTiers, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findTiersRibByTrbTiers", startResult, maxRows, trbTiers);
		return new LinkedHashSet<TiersRib>(query.getResultList());
	}

	/**
	 * JPQL Query - findTiersRibByPrimaryKey
	 *
	 */
	@Transactional
	public TiersRib findTiersRibByPrimaryKey(Integer trbTiers, Integer trbRib) throws DataAccessException {

		return findTiersRibByPrimaryKey(trbTiers, trbRib, -1, -1);
	}

	/**
	 * JPQL Query - findTiersRibByPrimaryKey
	 *
	 */

	@Transactional
	public TiersRib findTiersRibByPrimaryKey(Integer trbTiers, Integer trbRib, int startResult, int maxRows) throws DataAccessException {
		try {
			return executeQueryByNameSingleResult("findTiersRibByPrimaryKey", trbTiers, trbRib);
		} catch (NoResultException nre) {
			return null;
		}
	}

	/**
	 * JPQL Query - findTiersRibByTrbGuichet
	 *
	 */
	@Transactional
	public Set<TiersRib> findTiersRibByTrbGuichet(String trbGuichet) throws DataAccessException {

		return findTiersRibByTrbGuichet(trbGuichet, -1, -1);
	}

	/**
	 * JPQL Query - findTiersRibByTrbGuichet
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<TiersRib> findTiersRibByTrbGuichet(String trbGuichet, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findTiersRibByTrbGuichet", startResult, maxRows, trbGuichet);
		return new LinkedHashSet<TiersRib>(query.getResultList());
	}

	/**
	 * JPQL Query - findTiersRibByTrbPaysContaining
	 *
	 */
	@Transactional
	public Set<TiersRib> findTiersRibByTrbPaysContaining(String trbPays) throws DataAccessException {

		return findTiersRibByTrbPaysContaining(trbPays, -1, -1);
	}

	/**
	 * JPQL Query - findTiersRibByTrbPaysContaining
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<TiersRib> findTiersRibByTrbPaysContaining(String trbPays, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findTiersRibByTrbPaysContaining", startResult, maxRows, trbPays);
		return new LinkedHashSet<TiersRib>(query.getResultList());
	}

	/**
	 * JPQL Query - findAllTiersRibs
	 *
	 */
	@Transactional
	public Set<TiersRib> findAllTiersRibs() throws DataAccessException {

		return findAllTiersRibs(-1, -1);
	}

	/**
	 * JPQL Query - findAllTiersRibs
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<TiersRib> findAllTiersRibs(int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findAllTiersRibs", startResult, maxRows);
		return new LinkedHashSet<TiersRib>(query.getResultList());
	}

	/**
	 * JPQL Query - findTiersRibByTrbBicContaining
	 *
	 */
	@Transactional
	public Set<TiersRib> findTiersRibByTrbBicContaining(String trbBic) throws DataAccessException {

		return findTiersRibByTrbBicContaining(trbBic, -1, -1);
	}

	/**
	 * JPQL Query - findTiersRibByTrbBicContaining
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<TiersRib> findTiersRibByTrbBicContaining(String trbBic, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findTiersRibByTrbBicContaining", startResult, maxRows, trbBic);
		return new LinkedHashSet<TiersRib>(query.getResultList());
	}

	/**
	 * JPQL Query - findTiersRibByTrbGuichetContaining
	 *
	 */
	@Transactional
	public Set<TiersRib> findTiersRibByTrbGuichetContaining(String trbGuichet) throws DataAccessException {

		return findTiersRibByTrbGuichetContaining(trbGuichet, -1, -1);
	}

	/**
	 * JPQL Query - findTiersRibByTrbGuichetContaining
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<TiersRib> findTiersRibByTrbGuichetContaining(String trbGuichet, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findTiersRibByTrbGuichetContaining", startResult, maxRows, trbGuichet);
		return new LinkedHashSet<TiersRib>(query.getResultList());
	}

	/**
	 * JPQL Query - findTiersRibByTrbPays
	 *
	 */
	@Transactional
	public Set<TiersRib> findTiersRibByTrbPays(String trbPays) throws DataAccessException {

		return findTiersRibByTrbPays(trbPays, -1, -1);
	}

	/**
	 * JPQL Query - findTiersRibByTrbPays
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<TiersRib> findTiersRibByTrbPays(String trbPays, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findTiersRibByTrbPays", startResult, maxRows, trbPays);
		return new LinkedHashSet<TiersRib>(query.getResultList());
	}

	/**
	 * JPQL Query - findTiersRibByTrbDenomDom
	 *
	 */
	@Transactional
	public Set<TiersRib> findTiersRibByTrbDenomDom(String trbDenomDom) throws DataAccessException {

		return findTiersRibByTrbDenomDom(trbDenomDom, -1, -1);
	}

	/**
	 * JPQL Query - findTiersRibByTrbDenomDom
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<TiersRib> findTiersRibByTrbDenomDom(String trbDenomDom, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findTiersRibByTrbDenomDom", startResult, maxRows, trbDenomDom);
		return new LinkedHashSet<TiersRib>(query.getResultList());
	}

	/**
	 * JPQL Query - findTiersRibByTrbDateModificationBefore
	 *
	 */
	@Transactional
	public Set<TiersRib> findTiersRibByTrbDateModificationBefore(java.util.Calendar trbDateModification) throws DataAccessException {

		return findTiersRibByTrbDateModificationBefore(trbDateModification, -1, -1);
	}

	/**
	 * JPQL Query - findTiersRibByTrbDateModificationBefore
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<TiersRib> findTiersRibByTrbDateModificationBefore(java.util.Calendar trbDateModification, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findTiersRibByTrbDateModificationBefore", startResult, maxRows, trbDateModification);
		return new LinkedHashSet<TiersRib>(query.getResultList());
	}

	/**
	 * JPQL Query - findTiersRibByTrbDenomDomContaining
	 *
	 */
	@Transactional
	public Set<TiersRib> findTiersRibByTrbDenomDomContaining(String trbDenomDom) throws DataAccessException {

		return findTiersRibByTrbDenomDomContaining(trbDenomDom, -1, -1);
	}

	/**
	 * JPQL Query - findTiersRibByTrbDenomDomContaining
	 *
	 */

	@SuppressWarnings("unchecked")
	@Transactional
	public Set<TiersRib> findTiersRibByTrbDenomDomContaining(String trbDenomDom, int startResult, int maxRows) throws DataAccessException {
		Query query = createNamedQuery("findTiersRibByTrbDenomDomContaining", startResult, maxRows, trbDenomDom);
		return new LinkedHashSet<TiersRib>(query.getResultList());
	}

	/**
	 * Used to determine whether or not to merge the entity or persist the entity when calling Store
	 * @see store
	 * 
	 *
	 */
	public boolean canBeMerged(TiersRib entity) {
		return true;
	}
}
